select codcompet from GCMATCOM where SUBSTR(codcompet,0,4) = 'EVAC' and matricule = '02558' and (datfin > to_date('2016-01-01', 'YYYY-MM-DD'));
select matricule, codcompet from GCMATCOM where SUBSTR(codcompet,0,4) = 'EVAC';

select distinct(abs.matricule), abs.codabs, poste.libposte, col01, sal.libressource1, sal.libressource2, abs.datdeb, abs.datfin, max(post.datpla) as datepost 
from tbabsenc abs 
inner join rcressource sal on abs.matricule = sal.matricule 
left join postpla post on post.matricule = abs.matricule 
inner join poste poste on poste.codposte = post.codposte 
WHERE abs.datdeb <= to_date('2016-01-14', 'YYYY-MM-DD') and datfin >= to_date('2016-01-14','YYYY-MM-DD') and col01 = 'ADS-RM2000' and post.datpla > CURRENT_DATE 
group by abs.matricule, poste.libposte, abs.codabs, col01, sal.libressource1, sal.libressource2, abs.datdeb, abs.datfin 
order by sal.libressource1, datepost desc;
select libcompet from gcmatcom mat inner join gccompet comp on mat.codcompet = comp.codcompet 
                                                where codcla = 'EVACUATION';

